package com.chapter17.demo3;

public class SumTask implements Runnable{
    private int sum;
    @Override
    public void run() {
        for (int i=0;i<100;i++){
            sum=sum+i;
        }
        System.out.println("从1加到100任务执行完毕！");
    }

    public int getSum(){
        return sum;
    }
}
